{% extends 'index.html' %}

{% block body %}
    {% if dao %}
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="report-header" colspan="0"><h3>Codice articolo fornitore:
                    <strong>{{dao.codice_articolo_fornitore}}</strong></h3></td>
            </tr>
</table>
<table cellpadding="0" cellspacing="0" border="0">
            <tr><td colspan="4" class="table-header">Dati principali</td></tr>
            <tr>
                <td width="150px" class="odd-detail">Articolo</td>
                <td class="odd-detail"><strong>{{dao.articolo}}</strong></td>
            </tr>
            <tr>
                <td class="even-detail">Fornitore</td>
                <td class="even-detail">
                    {% if dao.fornitore_preferenziale %} Preferenziale{% endif %}
                    <strong>{{dao.fornitore}}</strong>
                </td>
            </tr>
            <tr>
                <td class="odd-detail">Data fornitura</td>
                <td class="odd-detail">
                    {% if  dao.data_fornitura %}
                        <strong>{{utils.dateToString(dao.data_fornitura)}}</strong>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <td class="even-detail">Data prezzo</td>
                <td class="even-detail">
                    {% if dao.data_prezzo %}
                        <strong>{{utils.dateToString(dao.data_prezzo)}}</strong>
                    {% endif %}
                </td>
            </tr>
            <tr>
                <td class="odd-detail">Aliquota IVA</td>
                <td class="odd-detail"><strong>{{utils.number_format() % dao.percentuale_iva}}</strong><strong> %</strong></td>
            </tr>
            <tr>
                <td class="even-detail">Scorta minima</td>
                <td class="even-detail"><strong>{{dao.scorta_minima}}</strong></td>
            </tr>
            <tr>
                <td class="odd-detail">Tempo arrivo merce</td>
                <td class="odd-detail"><strong>{{dao.tempo_arrivo_merce}}</strong></td>
            </tr>
            <tr><td colspan="2" class="table-header">Prezzi</td></tr>
            <tr>
                <td class="odd-detail">Prezzo lordo</td>
                <td class="odd-detail"><strong>{{utils.number_format() % dao.prezzo_lordo}}</strong> &euro;</td>
            </tr>
            <tr>
                <td class="even-detail">Prezzo netto</td>
                <td class="even-detail"><strong>{{utils.number_format() % dao.prezzo_netto}}</strong> &euro;</td>
            </tr>
        </table>
                {% else %}
        <p><img src= "gui/attenzione_48X48.png">ELIMINATO: Niente da visualizzare</p>
        <p><img src= "gui/testata_promogest2.png"></p>
        {% endif %}
{% endblock %}
